import { httpInstance } from '@/utils/request'

interface UserLoginAPIData {
  code: string
  iv: string
  encryptedData: string
}

interface UserLoginAPIResData {
  code: number
  data: {
    userinfo: UserInfo
  }
  msg: string
  time: string
}

export function userLoginAPI(data: UserLoginAPIData) {
  return httpInstance.post<
    UserLoginAPIResData,
    UserLoginAPIData
  >('api/user/wx_login', data)
}
